// Fill out your copyright notice in the Description page of Project Settings.


#include "Pickup/TUHealthPickup.h"
#include "Component/TUHealthComponent.h"
#include "TUUtils.h"
bool ATUHealthPickup::GivePickupTo(APawn* PlayerPawn)
{
    const auto HealthComponent = TUUtils::GetTUPlayerComponent<UTUHealthComponent>(PlayerPawn);
    if (!HealthComponent) return false;

    return HealthComponent->TryToAddHealth(HealthAmount);
}
